package com.stand.hardcode.entity;

import java.util.Date;
import java.util.Set;

import javax.jdo.annotations.PersistenceCapable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(detachable="true")
public class Item {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	private String title;
	
	@Persistent
	private String description;
	
	@Persistent
	private double price;
	
	@Persistent
	private Date creationTime;
	
	@Persistent
	private int status;
	
	@Persistent
	private String photoURL;
	
	@Persistent
	private int quantity;
	
	@Persistent
	private Date expiryDate;
	
	@Persistent
	private Set<Key> itemPermissions;
	
	@Persistent
	private Set<Key> virtualShops;
	
	@Persistent
	private Set<Key> collections;
	
	@Persistent
	private String creator;

	public Key getKey() {
		return key;
	}

	public void setKey(Key key) {
		this.key = key;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public Date getCreationTime() {
		return creationTime;
	}

	public void setCreationTime(Date creationTime) {
		this.creationTime = creationTime;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getPhotoURL() {
		return photoURL;
	}

	public void setPhotoURL(String photoURL) {
		this.photoURL = photoURL;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public Date getExpiryDate() {
		return expiryDate;
	}

	public void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	public Set<Key> getItemPermissions() {
		return itemPermissions;
	}

	public void setItemPermissions(Set<Key> itemPermissions) {
		this.itemPermissions = itemPermissions;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Set<Key> getVirtualShops() {
		return virtualShops;
	}

	public void setVirtualShops(Set<Key> virtualShops) {
		this.virtualShops = virtualShops;
	}

	public Set<Key> getCollections() {
		return collections;
	}

	public void setCollections(Set<Key> collections) {
		this.collections = collections;
	}
}
